<%@page import="com.dfhc.util.CryptoHelper"%>
<%@page import="com.dfhc.util.StringHelper"%>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />

<!-- 全局js 和css包 -->
<%@ include file="/jsp/include/web/new/global.jsp" %>
<title>添加rm_function_node </title>

<%@ taglib uri="/dfhc" prefix="dfhc" %>
</head>
<body>


<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-rmfunctionnode-add">
	   <input type="hidden" id="id" name="id" value="${bean.id}">
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span>类型：</dfhc:title>	    
			<dfhc:div templateId="h_ui_div_label_div">
				<dfhc:select templateId="h_ui_select" size="1" name="node_type" id="node_type" pleaseSelect="1" defaultValue="${bean.node_type}" sqlOption="code" code="RM_FUNCTION_NODE_TYPE" />				
			</dfhc:div>
			</dfhc:div>
	<dfhc:div templateId="h_ui_div_row_cl">					
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span>功能性质：</dfhc:title>	    
			<dfhc:div templateId="h_ui_div_label_div">
				<dfhc:select templateId="h_ui_select" size="1" name="function_property" id="function_property" pleaseSelect="1" defaultValue="${bean.function_property}" sqlOption="code" code="FUNCTION_PROPERTY" />				
			</dfhc:div>
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span>名称：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.name}" placeholder="" id="name" name="name"/>			
	    </dfhc:div>	 
	    </dfhc:div>	   		 
		<dfhc:div templateId="h_ui_div_row_cl">					
	    <dfhc:title templateId="h_ui_label_title_2"><dfhc:span templateId="h_ui_not_null_span"></dfhc:span>启用/禁用状态：</dfhc:title>	    
			<dfhc:div templateId="h_ui_div_label_div">
				<dfhc:select templateId="h_ui_select" size="1" name="enable_status" id="enable_status" pleaseSelect="1" defaultValue="${bean.enable_status}" sqlOption="code" code="RM_ENABLE_STATUS" />				
			</dfhc:div>
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2">完全编码：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.total_code}" placeholder="" id="total_code" name="total_code"/>			
	    </dfhc:div>	   
	    </dfhc:div>	 		 
		<dfhc:div templateId="h_ui_div_row_cl">					
	    <dfhc:title templateId="h_ui_label_title_2">排序编码：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.order_code}" placeholder="" id="order_code" name="order_code"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2">权限类型：</dfhc:title>	    
			<dfhc:div templateId="h_ui_div_label_div">
				<dfhc:select templateId="h_ui_select" size="1" name="funcnode_authorize_type" id="funcnode_authorize_type" pleaseSelect="1" defaultValue="${bean.funcnode_authorize_type}" sqlOption="code" code="FUNCNODE_AUTHORIZE_TYPE" />				
			</dfhc:div>
		</dfhc:div>
		<dfhc:div templateId="h_ui_div_row_cl">					
	    <dfhc:title templateId="h_ui_label_title_2">功能说明：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.description}" placeholder="" id="description" name="description"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2">URL值：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.data_value}" placeholder="" id="data_value" name="data_value"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
							
	    <dfhc:div templateId="h_ui_div_row_cl">
	    <dfhc:title templateId="h_ui_label_title_2">是否末点：</dfhc:title>	    
			<dfhc:div templateId="h_ui_div_label_div">
				<dfhc:select templateId="h_ui_select" size="1" name="is_leaf" id="is_leaf" pleaseSelect="1" defaultValue="${bean.is_leaf}" sqlOption="code" code="RM_YES_NOT" />				
			</dfhc:div>
			</dfhc:div>
		<dfhc:div templateId="h_ui_div_row_cl">				
	    <dfhc:title templateId="h_ui_label_title_2">图片：</dfhc:title>	    
	    <dfhc:div templateId="h_ui_div_label_div">	        
			<dfhc:input templateId="h_ui_input" value="${bean.icon}" placeholder="" id="icon" name="icon"/>			
	    </dfhc:div>	    		 
	  </dfhc:div>
							
		<dfhc:div templateId="h_ui_div_row_cl">
			<dfhc:div templateId="h_ui_div_pop_up_button2">
				<dfhc:button templateId="h_ui_submit_button" />
			</dfhc:div>
		</dfhc:div>
	</form>
</article>



<script type="text/javascript">
$(function(){
	//获取新id
	<c:if test="${empty bean}"> 
	$('#id').val(getNewId('rm_function_node'));
	</c:if>


	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-rmfunctionnode-add").validate({
		rules:{
			nodeType:{			
				required:true,
				minlength:1,
				maxlength:2
			},
			functionProperty:{			
				required:true,
				minlength:1,
				maxlength:50
			},
			name:{			
				required:true,
				minlength:1,
				maxlength:200
			},
			enableStatus:{			
				required:true,
				minlength:1,
				maxlength:50
			},
			totalCode:{			
				maxlength:200
			},
			orderCode:{			
				maxlength:50
			},
			funcnodeAuthorizeType:{			
				maxlength:1
			},
			description:{			
				maxlength:1000
			},
			dataValue:{			
				maxlength:1000
			},
			patternValue:{			
				maxlength:1000
			},
			isLeaf:{			
				maxlength:1
			},
			icon:{			
				maxlength:200
			},
			helpName:{			
				maxlength:200
			},
			usableStatus:{			
				maxlength:1
			},
			modifyDate:{			
			},
			modifyIp:{			
				maxlength:45
			},
			constraint:{			
			}
		},
 		messages: {
			nodeType:{
		        required: "请输入NODE_TYPE",
		        minlength: "NODE_TYPE至少由1个字母组成",
		        maxlength: "NODE_TYPE最大长度为2个字母"
	           },
			functionProperty:{
		        required: "请输入FUNCTION_PROPERTY",
		        minlength: "FUNCTION_PROPERTY至少由1个字母组成",
		        maxlength: "FUNCTION_PROPERTY最大长度为50个字母"
	           },
			name:{
		        required: "请输入NAME",
		        minlength: "NAME至少由1个字母组成",
		        maxlength: "NAME最大长度为200个字母"
	           },
			enableStatus:{
		        required: "请输入ENABLE_STATUS",
		        minlength: "ENABLE_STATUS至少由1个字母组成",
		        maxlength: "ENABLE_STATUS最大长度为50个字母"
	           },
			totalCode:{
		        maxlength: "TOTAL_CODE最大长度为200个字母"
	           },
			orderCode:{
		        maxlength: "ORDER_CODE最大长度为50个字母"
	           },
			funcnodeAuthorizeType:{
		        maxlength: "FUNCNODE_AUTHORIZE_TYPE最大长度为1个字母"
	           },
			description:{
		        maxlength: "DESCRIPTION最大长度为1000个字母"
	           },
			dataValue:{
		        maxlength: "DATA_VALUE最大长度为1000个字母"
	           },
			patternValue:{
		        maxlength: "PATTERN_VALUE最大长度为1000个字母"
	           },
			isLeaf:{
		        maxlength: "IS_LEAF最大长度为1个字母"
	           },
			icon:{
		        maxlength: "ICON最大长度为200个字母"
	           },
			helpName:{
		        maxlength: "HELP_NAME最大长度为200个字母"
	           },
			usableStatus:{
		        maxlength: "USABLE_STATUS最大长度为1个字母"
	           }
			
	    },		
		onkeyup:false,
		focusCleanup:true,
		success:"valid",
		submitHandler:function(form){
			<c:if test="${empty bean}"> 
			var url = getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/rmfunctionnode/insert")%>';
			</c:if>
			<c:if test="${not empty bean}"> 
			var url = getRootPath()+'<%=CryptoHelper.encryptUrl(request,"/rmfunctionnode/update")%>';
			</c:if>
			//提交成功关闭
			submitAjax(url,$("#form-rmfunctionnode-add").serialize(),"/rmfunctionnode"); 		    		    		
		}
	});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
